<script type="text/javascript">


function saveRoomConfigInfo() {
	var rows = $('#roomConfigSelectDeviceLinkList').datagrid('getRows');
	var roomConfigInfo = [{
		id:$('#roomConfigId').val(),
		roomType:$('#roomConfigRoomType').combobox('getText'),
		configInfo:$('#configInfo').val(),
		deviceLinks:rows
	}];
	printLog(roomConfigInfo);
	$.post("roomConfig.do?saveRoomConfigInfos", {data:JSON.stringify(roomConfigInfo)}, function(result) {
          if(result.success){
	       	  showMsg('保存成功.');
	       	  reloadRoomConfig();
          }else {
       	  	  showMsg('保存失败.');
          }
  	}, "JSON");
	
}
</script>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region: 'north', border:false" style="height:200px" >
		<table cellpadding="5">
			<input id="roomConfigId" name="id" type="hidden" value="${(roomConfigItem.id)!}" />
			<tr>
				<td>房间类型:</td>
				<td>
					<@eu.comboBox id="roomConfigRoomType" url="common.do?loadComboBox&key=ROOM_TYPE&text=${(roomConfigItem.roomType)!}" name="roomType" required="true" validType="remote['roomConfig.do?checkConfigIsExit&id=${(roomConfigItem.id)!}','roomType']" invalidMessage="请勿重复配置相同酒店类型"/>
				</td>
			</tr>
			<tr>
				<td>配置信息:</td>
				<td>
					<textarea id="configInfo" style="height: 140px;width:650px" rows="6"  name="configInfo" class="easyui-validatebox" data-options="required: true"  readonly="readonly" missingMessage="请在下面选择房间配置的元件信息" >${(roomConfigItem.configInfo)!}</textarea>
<!-- 					<textarea id="configInfo" style="height: 140px;width:650px" rows="6"  name="configInfo" class="easyui-validatebox" data-options="required: true" validType="remote['roomConfig.do?checkConfigIsExit','roomType']" readonly="readonly" missingMessage="请在下面选择房间配置的元件信息" invalidMessage="已重复">${(roomConfigItem.configInfo)!}</textarea> -->
				</td>
			</tr>
		</table>
	</div>
	<div data-options="region:'center',border:false,fit:true,title:'配置元件',href:'deviceLink.do?chooseDeviceLink&flag=fromRoomConfig&param=${(roomConfigItem.roomType)!}'">
		
	</div>
</div>
